package link.hwx.service.oa.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import link.hwx.entity.oa.OaUserInfo;
import link.hwx.mapper.oa.OaInfoMapper;
import link.hwx.service.oa.OaInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@DS("OAData")
@Service
public class OaInfoServiceImpl implements OaInfoService {

    @Autowired
    private OaInfoMapper oaInfoMapper;

    @Override
    public OaUserInfo findUserInfoByCode(String workcode) {
        return oaInfoMapper.findUserInfoByCode(workcode);
    }

    @Override
    public OaUserInfo findUserInfoById(String userId) {
        return oaInfoMapper.findUserInfoById(userId);
    }

    @Override
    public OaUserInfo findFileInfoByDocID(String docId) {
        return oaInfoMapper.findFileInfoByDocID(docId);
    }

    @Override
    public int updateWorkflowTableTitle(String requestName, String requestNameNew, String workflowId) {
        return oaInfoMapper.updateWorkflowTableTitle(requestName, requestNameNew, workflowId);
    }
    @Override
    public int updateMemoByRequestId(String mainTableName, String requestName, String requestid) {
        return oaInfoMapper.updateMemoByRequestId(mainTableName, requestName, requestid);
    }

    @Override
    public int updateSdByRequestId(String mainTableName, String requestName, String requestid) {
        return oaInfoMapper.updateSdByRequestId( mainTableName, requestName, requestid);
    }
}